﻿using System;
using System.Web.UI.WebControls;

namespace UIControls
{
    public delegate void RepeaterItemEventHandler(object sender, RepeaterItemEventArgs e);
    public delegate void RepeaterCommandEventHandler(object sender, RepeaterCommandEventArgs e);

    public class RepeaterItemEventArgs : EventArgs
    {
        private RepeaterItem _item;

        public RepeaterItemEventArgs(RepeaterItem item)
        {
            _item = item;
        }

        public RepeaterItem Item
        {
            get { return this._item; }
        }
    }

    public class RepeaterCommandEventArgs : CommandEventArgs
    {
        private object _commandSource;
        private RepeaterItem _item;

        public RepeaterCommandEventArgs(RepeaterItem item, object commandSource, CommandEventArgs originalArgs)
            : base(originalArgs)
        {
            this._item = item;
            this._commandSource = commandSource;
        }

        public object CommandSource
        {
            get
            {
                return this._commandSource;
            }
        }
        public RepeaterItem Item
        {
            get 
            { 
                return this._item; 
            }
        }
    }
}
